package com.dgut.medicalsystem;

import lombok.extern.slf4j.Slf4j;
import org.apache.activemq.command.ActiveMQQueue;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.jms.Destination;

@SpringBootApplication
@EnableCaching
@EnableTransactionManagement
@MapperScan("com.dgut.medicalsystem.mapper")
@Slf4j
public class MedicalSystemApplication {

    public static void main(String[] args) {
        SpringApplication.run(MedicalSystemApplication.class, args);
    }

    @Bean
    public Destination getDestination() {
        return new ActiveMQQueue("medical_notice");
    }
}
